package eleanor.ltd.isRealEstate.dao.messages;

import java.util.List;

import org.apache.tapestry5.hibernate.annotations.CommitAfter;
import eleanor.ltd.isRealEstate.entities.messages.Messages;
import eleanor.ltd.isRealEstate.entities.messages.priority.MessagePriority;

public interface MessagesDAO {

	@CommitAfter
    public boolean save(Messages newMessage);
	

    @CommitAfter
    public boolean delete(Messages Message);

    @CommitAfter
    public boolean update(Messages Message);

    public List<Messages> findAll();
    
    public List<Messages> findAllForPriority(MessagePriority messagePriority);

    public Messages findByID(Long id);

    @CommitAfter
    public boolean deleteByID(Long id);
    
}
